package book;

public class BookList {
    private Book[] booklist = new Book[10];
    private int usedsize;

    public BookList() {
        this.booklist[0] = new Book("book1","author1",18.1);
        this.booklist[1] = new Book("book2","author2",18.2);
        this.booklist[2] = new Book("book3","author3",18.3);

        this.usedsize = 3;
    }

    public Book getBook(int pos){
        return booklist[pos];
    }

    public void setBook(int pos,Book book){
        booklist[pos] = book;
        this.usedsize++;
    }

    public int getUsedsize() {
        return usedsize;
    }

    public void setUsedsize(int usedsize) {
        this.usedsize = usedsize;
    }
}
